package com.hq.web.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.json.JSONObject;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/user")
public class UserCtrl {
	
	/**
	 * restFul风格
	 */
	@RequestMapping("add/{id}")
	@ResponseBody
	public JSONObject editUser(@PathVariable String id,HttpServletRequest request,HttpServletResponse response){
		JSONObject resJsonObject=new JSONObject();
		resJsonObject.put("res", true);
		return resJsonObject;
	}

}
